<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height:100px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div>

    </div>
    <script>
        // 捕捉触摸行为而触发的事件 
 
        var divEle = document.querySelector('div');
        // touchstart //开始触摸 接触到屏幕的瞬间
        divEle.ontouchstart = function(){
            console.log(666);
        }
        // touchmove  手指在屏幕上触摸移动
        // 只要在上面滑动 就触发  
        divEle.ontouchmove = function(){
            console.log(666);
        }

        // touchend  手指离开屏幕的瞬间

        divEle.ontouchend = function(){
            console.log(666);
        }
    </script>
</body>
</html>